import request from '@/utils/request'

// 查询人员题库关系列表
export function listPeopleTitle(query) {
    return request({
        url: '/exam/title/list',
        method: 'get',
        params: query
    })
}

// 查询人员题库关系详细
export function getPeopleTitle(id) {
    return request({
        url: '/exam/title/' + id,
        method: 'get'
    })
}

// 新增人员题库关系
export function addPeopleTitle(data) {
    return request({
        url: '/exam/title',
        method: 'post',
        data: data
    })
}

// 修改人员题库关系
export function updatePeopleTitle(data) {
    return request({
        url: '/exam/title',
        method: 'put',
        data: data
    })
}

// 删除人员题库关系
export function delPeopleTitle(id) {
    return request({
        url: '/exam/title/' + id,
        method: 'delete'
    })
}

// 通过POST方法查询人员题库列表（适用于参数量大的场景）
export function listPeopleTitleByPost(data) {
    return request({
        url: '/exam/title/listByPost',
        method: 'post',
        data: data
    })
}
// 查询试题汇总列表
export function listPeopleTitleSummary(query) {
  return request({
    url: '/exam/title/peopleTitleSummary',
    method: 'get',
    params: query
  })
}
